import React from "react"
import { LeftOutline } from "antd-mobile-icons"
import "./Navbar.scss"
import { useHistory } from "react-router-dom"
function Navbar({ title }) {
  const history = useHistory()
  return (
    <div className="navbar">
      <span onClick={() => history.go(-1)}>
        <LeftOutline />
      </span>
      <p>{title}</p>
    </div>
  )
}

export default Navbar
